package com.lill.system.dao;

import com.lill.common.component.dao.IBaseDao;
import com.lill.system.model.SysUserEntity;

import java.util.List;
import java.util.Map;

/**
 * 系统用户
 *
 * @author lill
 */
public interface ISysUserDao extends IBaseDao<SysUserEntity> {

    /**
     * 查询用户的所有权限
     *
     * @param userId 用户ID
     */
    List<String> queryAllPerms(String userId);

    /**
     * 查询用户的所有菜单ID
     */
    List<String> queryAllMenuId(String userId);

    /**
     * 根据用户名，查询系统用户
     */
    SysUserEntity queryByUserName(String username);

    SysUserEntity queryByPersonId(String personId);

    /**
     * 修改密码
     */
    int updatePassword(Map<String, Object> map);
    
    int initPassword(Map<String, Object> map);

    List<SysUserEntity> queryAll(Map<String, Object> map);

    List<SysUserEntity> queryPhone(Map<String, Object> map);

    int updateApp(SysUserEntity user);
    
    List<Map<String, Object>> queryUserLogin(Map<String, Object> param);
   int updateByPhone(SysUserEntity user);
}
